In a conventional image forming apparatus, when an image forming unit that forms a toner image primarily transfers the toner image onto an intermediate transfer belt and secondarily transfers the toner image onto a recording medium, a position at which the toner image is formed on the intermediate transfer belt and a position of the recording medium are detected and a carrying speed of the recording medium is accelerated so that the toner image is formed at a correct position on the recording medium (for example, see Patent Document 1).